package propertydemo.propertydemo.property;

import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Description:在配置文件配置对象，加Component和ConfigurationProperties注解
 * @Author: liujinsheng
 * @Date: 2021/6/11.
 */
@Component
@ConfigurationProperties(prefix = "dog")
@Data
@ToString
public class Dog {
    private String name;
    private String age;
}
